<div class="wp-20">
    <ol class="breadcrumb">
        <li>广告中心</li>
        <li><a ui-sref="Channel" class="tittle-color">广告主</a></li>
        <li>广告主{{!planEdit?'编辑':'新建'}}</li>
    </ol>
    <div class="clearfix mt-10"  ng-show="formData.advertiserId">
        <label class="title" title="广告主ID">
            <label>I</label>
            <span>{{formData.advertiserId}}</span>
        </label>
        <label class="title" title="公司简称">
            <label>S</label>
            <span>{{formData.shortName}}</span>
        </label>
    </div>
    <form class="form-horizontal create-input" name="mainForm" ng-class="{planShow: !planEdit}" novalidate>
        <section class="fg-section ">
            <h5>基本设置</h5>
            <div class="form-group">

                <label class="col-sm-2 control-label">广告主帐号</label>

                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.userName}}</p>

                    <div ng-show="planEdit" class="form-inline">
                        <input type="text" name="userName" ng-blur="checkUserName()" class="form-control mw-300" placeholder="如：XXXX@163.com"  ng-model="formData.userName" ng-readonly="formData.advertiserId" required>
                        <span ng-if="checkData.userName == 'r'" class="cl"><i class="fa fa-check right" aria-hidden="true"></i></span>
                        <span ng-if="checkData.userName == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.userName}}</span>
                    </div>
                </div>
            </div>
            <div class="form-group">

                <label class="col-sm-2 control-label">广告主负责人</label>

                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.deputy}}</p>

                    <div ng-show="planEdit"  class="form-inline">
                        <input type="text" name="deputy" class="form-control mw-300"  placeholder="如：XXXX" ng-blur="checkDeputy()" ng-model="formData.deputy" required>
                        <span ng-if="checkData.deputy == 'r'" class="cl"><i class="fa fa-check right" aria-hidden="true"></i></span>
                        <span ng-if="checkData.deputy == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.deputy}}</span>
                    </div>
                </div>
            </div>
            <div class="form-group">

                <label class="col-sm-2 control-label">广告主类型</label>

                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{table[formData.advertiserType]}}</p>

                    <div ng-show="planEdit"  class="form-inline">
                        <select ng-model="formData.advertiserType"  ng-options="table[type] for type in [51,52]" class="select-style" ng-init="formData.advertiserType=51">

                        </select>
                    </div>
                </div>
            </div>

        </section>

        <section class="fg-section">
            <h5>广告主公司和联系人</h5>
            <div class="form-group">
                <label class="col-sm-2 control-label">公司简称</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.shortName}}</p>
                    <div ng-show="planEdit" class="form-inline">
                        <input type="text" name="shortName" class="form-control mw-300" placeholder="如：XXXX" ng-blur="checkShortName()" ng-model="formData.shortName" required>
                        <span ng-if="checkData.shortName == 'r'" class="cl"><i class="fa fa-check right" aria-hidden="true"></i></span>
                        <span ng-if="checkData.shortName == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.shortName}}</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">公司全称</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.companyName}}</p>
                    <div ng-show="planEdit" class="form-inline">
                        <input type="text" name="companyName" class="form-control mw-300"  placeholder="如：XXXX" ng-model="formData.companyName" ng-blur="checkCompanyName()" required>
                        <span ng-if="checkData.companyName == 'r'"><i class="fa fa-check right" aria-hidden="true"></i></span>
                        <span ng-if="checkData.companyName == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.companyName}}</span>
                    </div>
                </div>
            </div>

            <div class="form-group">

                <label class="col-sm-2 control-label">公司地址</label>

                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.companyAddress}}</p>
                    <div ng-show="planEdit">
                        <input type="text" name="companyAddress"  placeholder="如：XXXX" class="form-control mw-300" ng-model="formData.companyAddress" required>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">公司电话</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.companyPhone}}</p>
                    <div ng-show="planEdit" class="form-inline">
                        <input type="text" name="companyPhone"  placeholder="如：XXXX"  class="form-control mw-300" ng-blur="checkCompanyPhone()" ng-model="formData.companyPhone" required>
                        <span ng-if="checkData.companyPhone == 'r'"><i class="fa fa-check right" aria-hidden="true"></i>{{hintData.companyPhone}}</span>
                        <span ng-if="checkData.companyPhone == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.companyPhone}}</span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">网站地址</label>
                <div class="col-sm-8">
                    <p class="form-control-static" ng-hide="planEdit">{{formData.webSite}}</p>
                    <div ng-show="planEdit">
                        <input type="text" name="webSite" placeholder="如：XXXX"  class="form-control mw-300" ng-model="formData.webSite" required>
                    </div>
                </div>
            </div>
        </section>
        <section  class="fg-section">
            <h5>渠道主公司和联系人</h5>
            <div class="form-group">
                <label class="control-label1"></label>
                <div class="col-sm-8">
                    <div class="wapper pr" style="margin-left: 120px;">
                        <div class="mt s-input">
                            <div class="ds mw-120">
                                <span class="contacts-label">姓名</span>
                                <p class="form-control-static  form-inline ds" ng-hide="planEdit">{{formData.contactName}}</p>
                                <div ng-show="planEdit" class="form-inline ds" >
                                    <input type="text" name="contactName"  ng-blur="checkContactName()" placeholder="如:XXXX"  class="form-control iw-110" ng-model="formData.contactName" maxlength="50" required>
                                    <span ng-if="checkData.contactName == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.contactName}}</span>
                                    <span ng-if="checkData.contactName == 'r'"><i class="fa fa-check right" aria-hidden="true"></i></span>
                                </div>
                            </div>
                            <div class="dp df">
                                <span class="contacts-label">部门</span>
                                <div class="ds">
                                    <p class="form-control-static" ng-hide="planEdit">{{formData.department}}</p>
                                    <div ng-show="planEdit">
                                        <input type="text" name="department" class="form-control iw-110" placeholder="XXXX" ng-model="formData.department" maxlength="50" required>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mt">
                            <span class="contacts-label">职务</span>
                            <div class="ds">
                                <p class="form-control-static" ng-hide="planEdit">{{formData.contactDuty}}</p>
                                <div ng-show="planEdit">
                                    <input type="text" name="contactDuty" class="form-control iw-300" placeholder="如:XXXX"  ng-model="formData.contactDuty" maxlength="50" required>
                                </div>
                            </div>
                        </div>
                        <div class="mt">
                            <span class="contacts-label">邮箱</span>
                            <div class="ds">
                                <p class="form-control-static" ng-hide="planEdit">{{formData.contactEmail}}</p>
                                <div ng-show="planEdit" class="form-inline">
                                    <input type="text" name="contactEmail"  ng-blur="checkContactEmail()" placeholder="如:XXXX" class="form-control iw-300" ng-model="formData.contactEmail" maxlength="20" required>
                                    <span ng-if="checkData.contactEmail == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.contactEmail}}</span>
                                    <span ng-if="checkData.contactEmail == 'r'"><i class="fa fa-check right" aria-hidden="true"></i></span>
                                </div>
                            </div>
                        </div>
                        <div class="mt">
                            <span class="contacts-label">手机</span>
                            <div class="ds">
                                <p class="form-control-static" ng-hide="planEdit">{{formData.contactPhone}}</p>
                                <div ng-show="planEdit" class="form-inline">
                                    <input type="text" name="contactPhone" placeholder="如:XXXX" ng-blur="checkContactPhone()" class="form-control iw-300" ng-model="formData.contactPhone" maxlength="25" required>
                                    <span ng-if="checkData.contactPhone == 'e'" class="cl"><i class="fa fa-times error" aria-hidden="true"></i>{{hintData.contactPhone}}</span>
                                    <span ng-if="checkData.contactPhone == 'r'"><i class="fa fa-check right" aria-hidden="true"></i></span>

                                </div>
                            </div>
                        </div>
                        <div class="mt">
                            <span class=" contacts-label">微信</span>
                            <div class="ds">
                                <p class="form-control-static" ng-hide="planEdit">{{formData.contactWechat}}</p>
                                <div ng-show="planEdit">
                                    <input type="text" name="contactWechat" class="form-control iw-300" placeholder="如:XXXX" ng-model="formData.contactWechat" maxlength="50" required>
                                </div>
                            </div>
                        </div>
                        <div class="mt mb-20">
                            <span class="contacts-label">QQ</span>
                            <div class="ds">
                                <p class="form-control-static" ng-hide="planEdit">{{formData.contactQQ}}</p>
                                <div ng-show="planEdit">
                                    <input type="text" name="contactQQ" class="form-control iw-300" placeholder="如:XXXX" ng-model="formData.contactQQ" maxlength="20" required>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </section>

        <div class="text-center">
            <button type="button" class="btn btn-primary" ng-show="planEdit" ng-click="submit()">确定</button>
            <button type="button" class="btn btn-primary" ng-hide="planEdit" ng-click="edit()">修改</button>
            <button type="button" class="btn ims-btn" ng-click="cancle()">取消</button>
        </div>
    </form>


</div>
